This study presents a machine learning-based approach for predicting surface roughness in Fused Filament Fabrication (FFF) 3D printing, focusing on two key parameters: arithmetic average roughness (Ra) and mean peak-to-valley height (Rz). Experimental data were collected for two materials—Polylactic Acid (PLA) and Thermoplastic Polyurethane (TPU)—under varied printing parameters including nozzle temperature, deposition thickness, and print speed. The data was collected in the form of tables for both the materials and then the tables were combined. Multiple supervised learning models, including Polynomial Regression, Lasso Regression, Random Forest, Support Vector Regression, and XGBoost, were developed and compared. RMSE (Root Mean Square Error) and R² score were used as evaluation parameters. Additionally, a stacked ensemble learning strategy was implemented, exploiting the correlation between Ra and Rz for enhanced predictive accuracy. Results demonstrate that the ensemble approach significantly outperforms individual models, achieving near-perfect R² scores when incorporating spatial measurement line data. This work contributes to improved process optimization and quality control in FFF, enabling more reliable surface finish prediction across different thermoplastic materials.
Introduction
Additive manufacturing (AM), specifically Fused Filament Fabrication (FFF), is a popular 3D printing technique that builds parts layer by layer from thermoplastic filaments like PLA and TPU. While FFF is widely used for prototyping and functional parts due to its affordability and versatility, surface roughness remains a significant challenge affecting part quality, appearance, dimensional accuracy, and mechanical performance.
Surface roughness is quantified by parameters such as arithmetic average roughness (Ra) and mean peak-to-valley height (Rz), both critical for assessing surface finish but rarely modeled together. Printing parameters like temperature, speed, and layer thickness strongly influence surface roughness, but their effects are complex and nonlinear, making conventional predictive models inadequate.
This research explores the use of machine learning (ML) to predict surface roughness (Ra and Rz) of PLA and TPU samples printed under varied process conditions. Using Taguchi’s L9 orthogonal array to efficiently design experiments with 9 parameter combinations, the study measures surface roughness from multiple sample locations and develops predictive ML models. These models aim to enable accurate surface quality prediction and process optimization across different materials, addressing gaps in existing studies that typically focus on one material, use limited parameters, or neglect Rz.
Conclusion
This research demonstrates the effectiveness of machine learning techniques in predicting surface roughness metrics Ra and Rz for Fused Filament Fabrication (FFF) using both rigid (PLA) and flexible (TPU) thermoplastics. By integrating experimental data with advanced regression algorithms and a stacked ensemble learning strategy, the study achieved high predictive accuracy, with near-perfect R² values when including spatial measurement features. The results confirm that ensemble models outperform other models. This approach can significantly reduce trial-and-error in 3D printing parameter selection, enabling improved dimensional accuracy, mechanical performance, and production efficiency.
References
[1] J. S. Chohan, R. Singh, and K. S. Boparai, “Parametric optimization of fused deposition modelling by using response surface methodology for PLA,” Int. J. Adv. Manuf. Technol., vol. 89, no. 5–8, pp. 2251–2262, Jun. 2017. [Online]. Available: https://doi.org/10.1007/s00170-016-9205-2
[2] S. H. Ahn, M. Montero, D. Odell, S. Roundy, and P. K. Wright, “Anisotropic material properties of fused deposition modeling ABS,” Rapid Prototyping J., vol. 8, no. 4, pp. 248–257, 2002. [Online]. Available: https://doi.org/10.1108/13552540210441166
[3] D. Shahrjerdi and W. W. Wits, “Parametric study and optimization of TPU mechanical properties in fused deposition modeling,” Addit. Manuf., vol. 24, pp. 234–243, Dec. 2018. [Online]. Available: https://doi.org/10.1016/j.addma.2018.10.039
[4] F. Górski and R. Wichniarek, “Surface roughness analysis of FDM parts using profile and areal parameters,” Materials, vol. 14, no. 11, Art. no. 2963, 2021. [Online]. Available: https://doi.org/10.3390/ma14112963
[5] S. Singh, S. Ramakrishna, and R. Singh, “Material issues in additive manufacturing: A review,” J. Manuf. Process., vol. 25, pp. 185–200, Jan. 2017. [Online]. Available: https://doi.org/10.1016/j.jmapro.2016.11.006
[6] S. Dey and N. Yodo, “Machine learning techniques for fault detection and diagnosis in additive manufacturing: A review,” Addit. Manuf., vol. 35, Art. no. 101248, Dec. 2020. [Online]. Available: https://doi.org/10.1016/j.addma.2020.101248
[7] P. Kumar, S. K. Singh, and A. Tiwari, “Optimization of surface roughness and dimensional accuracy in fused deposition modeling using Taguchi method,” Materials Today: Proceedings, vol. 21, pp. 1593–1599, 2020. [Online]. Available: https://doi.org/10.1016/j.matpr.2019.11.244
[8] G. Torres, A. Jerez-Mesa, P. Travieso-Rodriguez, and S. Martorell, “Machine learning techniques applied to FDM 3D printing process: A state of the art review,” Materials, vol. 13, no. 14, Art. no. 3244, 2020. [Online]. Available: https://doi.org/10.3390/ma13143244
[9] R. Tiwary, A. Jain, and D. Choudhary, “Evaluation of surface roughness in FDM-printed PLA parts using image processing and machine learning,” Measurement, vol. 175, Art. no. 109169, 2021. [Online]. Available: https://doi.org/10.1016/j.measurement.2021.109169
[10] J. Stano, A. Ková?ik, and M. Hatala, “Investigation of surface roughness and dimensional accuracy in FDM technology with different materials and layer thickness,” Adv. Mech. Eng., vol. 13, no. 3, pp. 1–11, 2021. [Online]. Available: https://doi.org/10.1177/16878140211000387